package com.hnichr.ump.common.ping.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hnichr.ump.common.entity.UmpEntity;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;


@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "t_sms_send_content")
@Schema(description = "短信发送表")
public class SmsSendContent extends UmpEntity {
    @Id
    @Generator
    @Column(name = "ID_", updatable = false)
    @Schema(description = "ID")
    private String id;

    @Column(name = "MOBILE_")
    @Schema(description = "手机号")
    private String mobile ;

    @Column(name = "CONTENT_",length = 512)
    @Schema(description = "短信内容")
    private String content ;

    @Column(name = "TITLE_",length = 2)
    @Schema(description = "签名")
    @Dict(dicCode = "smsTitle")
    private String title="0";

    @Column(name = "SEND_TIME")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    @Schema(
            description = "发送时间"
    )
    private Date sendTime;

    @Column(name = "STATUS_")
    @Schema(description = "发送状态，0：失败，1：成功，-1：待发送")
    @Dict(dicCode = "SmsSendStat")
    private String status="-1";

}
